package com.hzhjhh.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import com.hzhjhh.entity.UserInfo;

/**
 * @author 12083
 * @description 针对表【sm_user_info(用户信息表)】的数据库操作Mapper
 * @createDate 2025-04-12 22:34:07
 * @Entity com.hzhjhh.entity.UserInfo
 */
public interface UserInfoMapper {

	static final String select5 = "select * from UserManage where CardId=? ";
	static final String select6 = "select * from UserManage where UserName=? and Password=? and UserGrade=?";
	
	@Select("select * from sm_user_info where Card_Id= #{cardId}")
	@ResultMap({"BaseResultMap"})
	UserInfo selectByCardId(String cardId);
	
	@Select("select * from sm_user_info where User_Name=#{userName} and user_Password=#{password} and User_type=#{userType}")
	@ResultMap({"BaseResultMap"})
	UserInfo selectByLoginInfo(@Param("userName")String userName, @Param("password")String password, @Param("userType")String userType);
	
	int insert(UserInfo userInfo);
	
	int update(UserInfo userInfo);
	
	int delete(String cardId);
}
